﻿using GrapeCity.Forguncy.Plugin;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CollectionOperationKit
{
    public class PropertyValueObject : ObjectPropertyBase
    {
        [FormulaProperty]
        [DisplayName("属性名")]
        public object Name { get; set; }

        [DisplayName("值")]
        [FormulaProperty(AcceptsReturn = true)]
        public object Value { get; set; }

        [DisplayName("属性类型")]
        [ComboProperty]
        public PropertyDataType DataType { get; set; } = PropertyDataType.AUTO;
    }

    public enum PropertyDataType {
        [Description("默认类型（自动推断）")]
        AUTO,
        [Description("文本（string）")]
        STRING,
        [Description("是否（bool）")]
        BOOL,
        [Description("整数（int）")]
        INT,
        [Description("小数（float）")]
        FLOAT,
        [Description("时间日期（datetime）")]
        DATETIME
    }
}
